﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Track : HtmlElement, WithSrc, WithLabel
	{
		public Track() : base(TrackDescription.Instance) { }

		public string Kind { get { return this["kind"]; } set { this["kind"] = value; } }
		public string Src { get { return this["src"]; } set { this["src"] = value; } }
		public string SrcLang { get { return this["srclang"]; } set { this["srclang"] = value; } }
		public string Label { get { return this["label"]; } set { this["label"] = value; } }
		public bool Default { get { return GetAttributeBool("default"); } set { SetAttribute("default", value); } }
	}
	public class TrackDescription : HtmlElementDescription
	{
		public static readonly TrackDescription Instance = new TrackDescription();
		private TrackDescription() : base("track", HtmlVersion.Html5, false, false) { }
		public override Type ControlType { get { return typeof(Track); } }
		public override string Description { get { return "enables supplementary media tracks such as subtitle tracks and caption tracks to be specified for audio and video elements."; } }
	}
}
